package com.example.server.service;

import cn.example.server.dto.User;
import com.example.server.utils.DataUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import java.util.List;

/**
 * @Author: YAOZUN
 * @Date: Created in 17:26 2018/12/16 0016
 * @Description:
 */
@Service(value="rmiServiceImpl")
public class RmiServiceImpl implements RmiService{

    private static Logger logger = LoggerFactory.getLogger(RmiServiceImpl.class);

    @PostConstruct
    public void initMethod(){
        System.out.println("我是初始化方法时调用的");
    }
    @Override
    public String invokingRemoteService(String msg) {
        logger.info("-----------进入rmiabcd方法,客户端参数："+ msg +"--------------");
        return msg;
    }

    @Override
    public List<User> bigMsg() {
        return DataUtil.getUser();
    }

}
